<%@ Page Language="C#" MasterPageFile="~/Views/Shared/HtmlRepresentation.Master" Inherits="System.Web.Mvc.ViewPage<AltNetUK.Models.RegistrationForm>" %>
<%@ Import Namespace="SimpleWebServices.Data" %>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<% if (this.ViewData.Model.Data.Complete) { %>
    <p>Thank you, your registration request has been received and will be processed in due course.</p>
    <p>If you want to stay at a hotel, the <a href='http://www.novotel.com/gb/hotel-3269-novotel-london-city-south/index.shtml' title='Novotel London City South Homepage' rel='nofollow'>Novotel London City South</a> is opposite the Conchango offices on Southwark Bridge Road.</p>
    <p>You will be notified by email when your request is processed.</p>
    <dl>
        <dt>Your name:</dt>
        <dd><%=Html.Encode(this.ViewData.Model.Data.Name)%></dd>
        <dt>Your twitter:</dt>
        <% if (string.IsNullOrEmpty(this.ViewData.Model.Data.Twitter)) { %>
        <dd><em>None provided.</em></dd>
        <% } else { %>
        <dd><a href='http://twitter.com/<%=Url.Encode(this.ViewData.Model.Data.Twitter)%>' rel='bookmark'>@<%=Html.Encode(this.ViewData.Model.Data.Twitter)%></a></dd>
        <% } %>
        <dt>Your email address:</dt>
        <dd><%=Html.Encode(this.ViewData.Model.Data.Email)%></dd>
        <dt>You are registered for:</dt>
        <% if (this.ViewData.Model.Data.AltNetBeers) { %>
        <dd>Alt.Net Beers on Friday 31 July 2009 <a href='/2009-07-31' rel='bookmark'>Read more &hellip;</a></dd>
        <% } %>
        <% if (this.ViewData.Model.Data.OpenSpaceCoding) { %>
        <dd>Open Space Coding Day on Saturday 1 August 2009 <a href='/2009-08-01' rel='bookmark'>Read more &hellip;</a></dd>
        <% } %>
        <% if (this.ViewData.Model.Data.AltNetConference) { %>
        <dd>Alt.Net Conference Day on Sunday 2 August 2009 <a href='/2009-08-02' rel='bookmark'>Read more &hellip;</a></dd>
        <% } %>
        <dt>Your message:</dt>
        <dd><%=Html.Encode(this.ViewData.Model.Data.Message).Replace(Environment.NewLine, "<br />")%></dd>
    </dl>
<% } else { %>
    <% if (this.ViewData.Model.DisplayForm) { %>
        <p>Please complete the following form to request attendance. All of the events are free.</p>
        <form action='/registration' method='post'>
            <input id='unique' name='unique' type='hidden' value='<%=(this.ViewData.Model.Data as IPersistable).Unique.HasValue ? (this.ViewData.Model.Data as IPersistable).Unique.ToString() : string.Empty %>' />
            <p>
                <%=RegistrationForm.NameControl.Render(1, Html.Encode(this.ViewData.Model.Data.Name), 40)%>
            </p>
            <p>
                <%=RegistrationForm.TwitterControl.Render(2, Html.Encode(this.ViewData.Model.Data.Twitter), 40)%>
            </p>
            <p>
                <%=RegistrationForm.EmailControl.Render(3, Html.Encode(this.ViewData.Model.Data.Email), 40)%>
            </p>
            <fieldset>
                <legend>Please select which events you would like to attend. Spaces are limited, so please do not select an event unless you are sure that you can attend:</legend>
                <p>
                    <%=RegistrationForm.AltNetBeersControl.Render(4, this.ViewData.Model.Data.AltNetBeers, this.ViewData.Model.AltNetBeers.IsFull)%>
                    <% if (this.ViewData.Model.AltNetBeers.IsFull){ %>Sorry, there are no more AltNet Beers places left.<% } %>
                    &nbsp;<a href='/2009-07-31' rel='bookmark'>Read&nbsp;more&nbsp;&hellip;</a>
                </p>
                <p>
                    <%=RegistrationForm.OpenSpaceCodingControl.Render(4, this.ViewData.Model.Data.OpenSpaceCoding, this.ViewData.Model.OpenSpaceCoding.IsFull)%>
                    <% if (this.ViewData.Model.OpenSpaceCoding.IsFull){ %>Sorry, there are no more Open Space Coding Day places left.<% } %>
                    &nbsp;<a href='/2009-08-01' rel='bookmark'>Read&nbsp;more&nbsp;&hellip;</a>
                </p>
                <p>
                    <%=RegistrationForm.AltNetConferenceControl.Render(4, this.ViewData.Model.Data.AltNetConference, this.ViewData.Model.AltNetConference.IsFull)%>
                    <% if (this.ViewData.Model.AltNetConference.IsFull) { %>Sorry, there are no more Alt.Net Conference Day places left.<% } %>
                    &nbsp;<a href='/2009-08-02' rel='bookmark'>Read&nbsp;more&nbsp;&hellip;</a>
                </p>
            </fieldset>
            <p>
                <%=RegistrationForm.MessageControl.Render(7, Html.Encode(this.ViewData.Model.Data.Message), 100, 5)%>
            </p>
            <input type='submit' tabindex='8' value='Submit' />
            &nbsp;
            <input type='reset' class='reset' tabindex='9' value='Reset' />
        </form>
    <% } else { %>
        <p>Sorry, Registration is now closed as all the events are now full.</p>
    <% } %>
<% } %>
<hr />
<p>If you have any problems, please contact:</p>
<div class='vcard'>
    <div class='fn n'><a href='http://alandean.blogspot.com/' rel='bookmark' title='Alan Dean'><span class='given-name'>Alan</span>&nbsp;<span class='family-name'>Dean</span></a>
        <div>Telephone <span class='tel'>+44 7960 737 585</span></div>
        <address title='Alan Dean'><a rel='nofollow' href='mailto:alan.dean@gmail.com' title='Alan Dean'><span class='email'>alan.dean@gmail.com</span></a></address>
    </div>
</div>
<div class='twitter'><a href='http://twitter.com/adean' rel='nofollow' title='@adean'>twitter.com/adean</a></div>
</asp:Content>